home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 December / PCWorld_2004-12_cd.bin / software / temacd / tiny / tf6pro-6[1].0.140.exe / Tiny Firewall Pro 6.0.msi / Event_ie5_detail.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-20  |  6.2 KB  |  219 lines

  1. <?xml version='1.0' ?>
  2. <!-- /*//////////////////////////////////////////////////////////////////////
  3. //filename:         log.xsl
  4. //copyright(c):     Tiny Software corp 2002, 2003 (http://www.tinysoftware.com)
  5. //author:         Jozef Palocko (jpalocko@tinysoftware.com)
  6. //product:         Tiny Personal Firewall 5.x                
  7. //description:     Log analyzer stylesheet
  8. //changelog:    
  9. //    18.8.2003 - added displaying date in local time zone
  10. ///////////////////////////////////////////////////////////////////////*/ -->
  11. <xsl:stylesheet version="1.0" 
  12.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  13.     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  14.     xmlns:time="http://mycompany.com/mynamespace">
  15.  
  16. <xsl:import href="log.xsl"/>
  17. <!--xsl:output method="html" indent="yes" /-->
  18.  
  19.    <xsl:template match="/">
  20.    <style> 
  21.        <xsl:text>
  22.        BODY {
  23.                font-family: "MS Sans serif", "Verdana", "Tahoma" ;
  24.                 font-size: 10px;
  25.                 background-color: #ffffff;  
  26.                 color:#000000;
  27.             }       
  28.         .clsFirewall{
  29.             background-color: e2bde6;
  30.             height:10px;
  31.             }
  32.         .clsSandbox{
  33.             background-color: #f2f7b6;
  34.             height:10px;
  35.             }
  36.         .clsIDS{
  37.             background-color: #ffffd7;  
  38.             height:10px;
  39.             }
  40.         .clsEvent{
  41.             background-color: #fafafa;  
  42.             text-align : left;
  43.            margin-bottom: 10px;
  44.             }    
  45.         .clsAllow{
  46.         color =#2e8b57;
  47.         font-weight : bold;
  48.         }            
  49.         .clsPrevent{
  50.         color =#ff0000;
  51.         font-weight : bold;
  52.         }            
  53.         .clsAskUser{
  54.         color =#00ffff;
  55.         font-weight : bold;
  56.         }            
  57.  
  58.  
  59.        </xsl:text>
  60.        </style>
  61.         
  62.         <xsl:call-template name="tplModule">
  63.             <xsl:with-param name="Events" select="/Root/Event"/>
  64.         </xsl:call-template>
  65.    </xsl:template>
  66.  
  67.  <!-- 
  68.  //////////////////////////////////////
  69.  ///////// Element templates 
  70.  
  71.  -->
  72.  
  73.  
  74.    <!-- ///////// Object //////////// -->
  75.    <xsl:template match="Object">
  76.    <B> Ot: </B>
  77.    <xsl:choose>
  78.         <xsl:when test="@ot='0x00000001'">file</xsl:when>
  79.         <xsl:when test="@ot='0x00000002'">service</xsl:when>
  80.         <xsl:when test="@ot='0x00000004'">registry key</xsl:when>
  81.         <xsl:when test="@ot='0x00000008'">Spawning object</xsl:when>
  82.         <xsl:when test="@ot='0x00000010'">Device</xsl:when>
  83.         <xsl:when test="@ot='0x00000020'">VBA Macro</xsl:when>
  84.         <xsl:when test="@ot='0x00000040'">COM object</xsl:when>
  85.         <xsl:when test="@ot='0x00000080'">System privileges</xsl:when>
  86.         <xsl:when test="@ot='0x00000400'">Transport object</xsl:when>
  87.         <xsl:when test="@ot='0x10000000'">Action</xsl:when>
  88.         <xsl:when test="@ot='0x20000000'">Message</xsl:when>
  89.       </xsl:choose>
  90.       <B>   Object: </B>
  91.       <xsl:value-of select="." />
  92.       <BR />
  93.    </xsl:template>
  94.    
  95.    <!-- ///////// App //////////// -->
  96.    <xsl:template match="App">
  97.       <B>App: </B>
  98.       <xsl:value-of select="." />
  99.       <BR />
  100.       <xsl:if test="@chksm">
  101.          <B> Chksm: </B>
  102.          <xsl:value-of select="@chksm" />
  103.       </xsl:if>
  104.    </xsl:template>
  105.    
  106.    <!-- ///////// Action //////////// -->
  107.    <xsl:template match="Action">
  108.    <B>Action:</B>
  109.        <xsl:choose>
  110.              <xsl:when test="@ar=1">
  111.                 <span class="clsAllow"> Allow </span>
  112.           </xsl:when>
  113.           <xsl:when test="@ar=0">
  114.                 <span class="clsPrevent"> Prevent</span>
  115.           </xsl:when>
  116.           <xsl:when test="@ar=2">
  117.                 <span class="clsAskUser"> Ask User</span>
  118.           </xsl:when>
  119.          </xsl:choose>
  120.  
  121.       <xsl:if test="@fnc">
  122.          <B> Fnc: </B>
  123.          <xsl:variable name="ID" select="@fnc" />    <xsl:value-of select="$Def//Fnc[@id_dec=$ID]" /> (<xsl:value-of select="$ID" />)
  124.          <BR />
  125.       </xsl:if>
  126.    </xsl:template>
  127.    
  128.    <!-- ///////// Msg //////////// -->
  129.    <xsl:template match="Msg">
  130.       <B>Msg: </B>
  131.       <xsl:value-of select="." />
  132.       <br />
  133.    </xsl:template>
  134.    
  135.    <!-- ///////// InetDef //////////// -->
  136.    <xsl:template match="InetDef">
  137.       <B>Prot: </B>
  138.       <xsl:value-of select="@prot" />
  139.       <B>  Dir: </B>
  140.       <xsl:value-of select="@dir" />
  141.       <B>  RemIp: </B>
  142.       <xsl:value-of select="@remIp" />
  143.       <xsl:if test="@locPort">
  144.          <B>  LocPort: </B>
  145.          <xsl:value-of select="@locPort" />
  146.       </xsl:if>
  147.       <xsl:if test="@locPort">
  148.          <B>  RemPort: </B>
  149.          <xsl:value-of select="@remPort" />
  150.          <BR />
  151.       </xsl:if>
  152.       <xsl:if test="@icmpFn">
  153.          <B>  IcmpFn: </B>
  154.          <xsl:value-of select="@icmpFn" />
  155.          <BR />
  156.       </xsl:if>
  157.       <xsl:if test="@locIp">
  158.          <B>  LocIp: </B>
  159.          <xsl:value-of select="@locIp" />
  160.          <BR />
  161.       </xsl:if>
  162.    </xsl:template>
  163.  
  164.    <!-- ///////// Event //////////// -->
  165.    <xsl:template match="Event">
  166.      <xsl:param name="Total"/>
  167.     <xsl:param name="Events"/>
  168.     <xsl:if test="($Filter//cnt=0) or (position()>$Total - $Filter//cnt)">
  169.  
  170.      <div class="clsEvent" >
  171.       <div>
  172.       <xsl:attribute name="class">
  173.        <xsl:choose>
  174.              <xsl:when test="@module=1">clsSandbox</xsl:when>
  175.           <xsl:when test="@module=2">clsFirewall</xsl:when>
  176.           <xsl:when test="@module=16">clsIDS</xsl:when>
  177.          </xsl:choose>
  178.           </xsl:attribute>
  179.  
  180.         <xsl:text>Module: </xsl:text>      
  181.            <xsl:choose>
  182.                  <xsl:when test="@module=1"> <b>Windows security</b> </xsl:when>
  183.                   <xsl:when test="@module=2"> <b>Firewall</b> </xsl:when>
  184.                   <xsl:when test="@module=16"> <b>IDS</b> </xsl:when>
  185.                <xsl:otherwise>
  186.                    <xsl:value-of select="@module"/>
  187.                </xsl:otherwise>
  188.              </xsl:choose>
  189.         
  190.             <xsl:text>  Date: </xsl:text>
  191.             <xsl:value-of select="time:LocalTime(.)"/>
  192. <!--                <xsl:value-of select="@dateTimeLast" />-->
  193.             <xsl:if test="@user">
  194.               <xsl:text>  User: </xsl:text> 
  195.                           <B>[<xsl:value-of select="@user" />] </B>
  196.             </xsl:if> 
  197.             <xsl:if test="@domain">
  198.               <xsl:text> Domain: </xsl:text>
  199.                 <B>[<xsl:value-of select="@domain" />] </B>
  200.             </xsl:if> 
  201.             
  202.       </div>
  203.       <xsl:if test="@count">
  204.          <B> Count: </B>
  205.          <xsl:value-of select="@count" />
  206.       </xsl:if>
  207.      <!--  <xsl:if test="@ruleID">
  208.          <B> RULEID: </B>
  209.          <xsl:value-of select="@ruleID" />
  210.       </xsl:if>
  211.       -->
  212.  
  213.       <xsl:apply-templates />
  214.        </div>
  215.     </xsl:if>
  216.    </xsl:template>
  217.  
  218. </xsl:stylesheet>
  219.